import { requestGet } from '../../api/request'
Page({
  data: {
    formData:{
      "name":"",
      "phone":"",
      "license_number":""
    },
    carinfo:{},
    rules:{}
  },
  onLoad: function () {
      // 获取用户详情
    
  },
  bindViewTap() {

  },

  //保存
  submitForm (){
    console.log(this.data.formData)
  },
  getCarNum (e){
    let carinfo = {}
    carinfo.carNum =e.detail.carNum
    carinfo.inputPlates =e.detail.inputPlates
    carinfo.isPlate = e.detail.isPlate
    carinfo.isNewEnergy = e.detail.isNewEnergy
    this.setData({
    carinfo
    })
    this.data.formData.license_number = e.detail.carNum
  },
  formInputChange(e) {
    const {field} = e.currentTarget.dataset
    this.setData({
        [`formData.${field}`]: e.detail.value
    })
  },    
})
